/*
 * @Description: 
 * @Author: fograin4
 * @Date: 2023-09-06 15:46:17
 * @LastEditTime: 2023-10-17 11:24:21
 * @LastEditors: fograin4
 * @Reference: 
 */
import { ElNotification } from 'element-plus'

// 根据 code 返回相应的接口请求信息；
export function resCode(code:any, message:any) {
  const open1 = () => {
    ElNotification({
      title: '接口请求',
      message: message,
      type: 'success',
    })
  }
  const open2 = () => {
    ElNotification({
      title: '接口请求',
      message: message,
      type: 'error',
    })
  }
  if (code == 200) { // code —— 200
    open1()
  } else { // code —— 未知
    open2()
  }
}